<?php 
require_once '../Lib/main.php';
$page = null;
if (isset($_REQUEST['p'])) {
	$page = $_REQUEST['p'];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/admin.css">
<title>Insert title here</title>
</head>
<body>
<div class="main-container">
	<table border="1" class="main-table">
		<tr class="admin-header">
			<td colspan="2">
				<?php require 'framepage/headeradmin.php';?>
			</td>
		</tr>
		<tr>
			<td class="admin-menu-td">
				<?php require_once 'framepage/leftmenu.php'; ?>
			</td>
			<td id="center-container">
				<?php 
					//require_once 'content/content_list_category.php';
					
					if ($page !== null) {

						$page = 'content/' . $page;
						
						if (is_readable($page)) {
							require_once $page;
						} else {
							echo "Page not found";
						}
					}
				?>
			</td>
		</tr>
	</table>
</div>
</body>
</html>
